package hypeerwebtest;

import communications.Command;
import hypeerweb.*;

public class ConcurrencyPounder extends Thread
{	
	private int times;
	private HyPeerWeb targetWeb;
	private Node startNode;
	
	public ConcurrencyPounder(int times, HyPeerWeb targetWeb, Node startNode)
	{
		this.times = times;
		this.targetWeb = targetWeb;
		this.startNode = startNode;
	}
	
	public void run()
	{
		for (int i = 0; i < times; ++i)
		{
			targetWeb.addToHyPeerWeb(startNode);
			targetWeb.removeFromHyPeerWeb(1);
		}
	}
}
